var a = require("../../../@babel/runtime/helpers/defineProperty"), t = getApp();

Page({
    data: {
        id: "",
        list: [],
        last_page: 1,
        page: 1,
        pluginName: {}
    },
    onLoad: function(a) {
        a.id && (this.setData({
            id: a.id
        }), this.getData());
    },
    getData: function() {
        var e = this;
        t._postNetWork({
            url: t.getNetAddresss("plugin.subscription.frontend.modules.member.controllers.detail.index"),
            data: {
                stage_id: this.data.id
            },
            success: function(s) {
                var i;
                s.data.result ? e.setData((i = {
                    list: s.data.data.buy_list.data,
                    last_page: s.data.data.buy_list.last_page
                }, a(i, "pluginName.love_name", s.data.data.love_name), a(i, "pluginName.point_name", s.data.data.point_name), 
                i)) : t.tips(s.data.msg);
            }
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {
        var a = this;
        this.data.page >= this.data.last_page || t._postNetWork({
            url: t.getNetAddresss("plugin.subscription.frontend.modules.member.controllers.detail.index"),
            data: {
                page: this.data.page + 1,
                stage_id: this.data.id
            },
            success: function(e) {
                if (e.data.result) {
                    var s = a.data.list.concat(e.data.data.buy_list.data);
                    a.setData({
                        list: s,
                        page: e.data.data.buy_list.page,
                        last_page: e.data.data.buy_list.last_page
                    });
                } else t.tips(e.data.msg);
            }
        });
    },
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});